using System;
using System.Collections.Generic;

namespace Sedge.Core.Configuration
{
	public class Options
	{
		#region Members
		
		private readonly IDictionary<string, string> _options;
		public IDictionary<string, string> OptionsDictionary
		{
			get { return _options; }
		}
		
		#endregion //Members

		#region Constructors
		
		public Options(IDictionary<string, string> options)
		{
			_options = options;
		}

		#endregion //Constructors

		#region Options

		public string GetGeneralOption(string case1, string case2)
		{
			if (_options == null)
				return String.Empty;

			string result = String.Empty;

			if (_options.ContainsKey(case1))
				result = _options[case1];
			else if (_options.ContainsKey(case2))
				result = _options[case2];
			return result;
		}

		public string Caption()
		{
			return GetGeneralOption("Caption", "caption");
		}

		public string SearchPath()
		{
			return GetGeneralOption("SearchPath", "searchPath");
		}

		public string UISource()
		{
			return GetGeneralOption("UISource", "uiSource");
		}

		public string Example()
		{
			return GetGeneralOption("Example", "example");
		}

		public string Width()
		{
			return GetGeneralOption("Width", "width");
		}

		public string Height()
		{
			return GetGeneralOption("Height", "height");
		}

		public string Header()
		{
			return GetGeneralOption("Header", "header");
		}

		public string Text()
		{
			return GetGeneralOption("Text", "text");
		}

		public string Notes()
		{
			return GetGeneralOption("Notes", "notes");
		}

		public string Key()
		{
			return GetGeneralOption("Key", "key");
		}

		public string Value()
		{
			return GetGeneralOption("Value", "value");
		}

		#endregion //Options
	}
}